Skip to content

5.x Database column#947

Merged
dereuromark merged 4 commits into5.xfrom
database-column
Nov 5, 2025
Merged

5.x Database column#947
dereuromark merged 4 commits into5.xfrom
database-column

Conversation

@markstory
Copy link
Copy Markdown
Member

Align migrations with cakephp/database where possible. I've introduced some soft deprecations for the properties that have different names in migrations currently. Longer term, I'd like the internal data objects to be aligned and the compatibility shim is only used when constructing columns from arrays.

Align migrations with cakephp/database where possible. I've introduced
some soft deprecations for the properties that have different names in
migrations currently. Longer term, I'd like the internal data objects to
be aligned and the compatibility shim is only used when constructing
columns from arrays.
[SqliteAdapter::PHINX_TYPE_MACADDR, false],
[SqliteAdapter::PHINX_TYPE_POINT, false],
[SqliteAdapter::PHINX_TYPE_POLYGON, false],
[Literal::from('someType'), true],
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the one breaking change that was made for columns. I don't think this will be problematic, but I've been wrong in the past many times. Supporting this will require more shimming to make Literal compatible with types in cakephp/database, and will make Cake\Database\Schema\Column::$type into a union which splashes all over the internals of the ORM and database package in breaking ways.

Another option could be to handle the wider type in the constructor, and setType(), and downcast to a string there.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also drop this for now and revisit this later when someone runs into this problem in a real usecase.
Currently, we are just speculating if this feature is actually needed by users or not.

@dereuromark dereuromark merged commit 74c4336 into 5.x Nov 5, 2025
13 checks passed
@dereuromark dereuromark deleted the database-column branch November 5, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants